package leetCode.fifthWeek;

import org.junit.Test;

import java.util.Arrays;

public class Code_88 {

    @Test
    public void test() {
        System.out.println("Hello, World!");
    }

    public void merge(int[] nums1, int m, int[] nums2, int n) {
        int[] tmp = new int[m + n];
        if (m >= 0) System.arraycopy(nums1, 0, tmp, 0, m);
        if (n >= 0) System.arraycopy(nums2, 0, tmp, m + 0, n);
        Arrays.sort(tmp);
        System.arraycopy(tmp, 0, nums1, 0, nums1.length);
    }
}
